package com.zhangdi.demo.gateway;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixProperty;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class TestController {
    @Resource
    IPaymentResource payment;

    @GetMapping("/consumer/test0")
    @HystrixCommand(fallbackMethod = "ffff")
    public String testConsumer(){
        return payment.pay();
    }

    public String ffff(){
        return "烦烦烦方法";
    }
}
